<template>
  <div>
    <div class="car_search_box">
      <div class="car_header">
        <input type="text" />
        <button>搜索</button>
      </div>
    </div>
    <div class="car_box">
      <div class="car_title">
        <div>购物车（全部？？）</div>
        <div>
          已选商品：￥2323
          <button>结算</button>
        </div>
      </div>
      <div class="car_hd">
        <el-row :gutter="0">
          <el-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
            <div class="grid-content">
              <input type="checkbox" />
              全部
            </div>
          </el-col>
          <el-col :xs="7" :sm="7" :md="7" :lg="7" :xl="7">
            <div class="grid-content">商品信息</div>
          </el-col>
          <el-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2">
            <div class="grid-content">单价</div>
          </el-col>
          <el-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
            <div class="grid-content">数量</div>
          </el-col>
          <el-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
            <div class="grid-content">金额</div>
          </el-col>
          <el-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2">
            <div class="grid-content">操作</div>
          </el-col>
        </el-row>
      </div>
<!-- main -->
      <div class="car_main" v-for="itemMain in 4" :key="itemMain">
        <el-row :gutter="0">
          <el-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
            <div class="grid-content item_img">
              <input type="checkbox" />
              <img
                src="https://img0.baidu.com/it/u=2972251030,4111072434&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
                alt=""
              />
            </div>
          </el-col>
            <el-col :xs="7" :sm="7" :md="7" :lg="7" :xl="7">
            <div class="grid-content">
              <p>dsad{{itemMain}}</p>
            </div>
          </el-col>
          <el-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2">
            <div class="grid-content">￥233</div>
          </el-col>
          <el-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
            <div class="grid-content numd" >
              <el-input-number
                size="mini"
                controls-position="right"
                v-model="num"
                :min="1"
                :max="1000"
              ></el-input-number>
            </div>
          </el-col>
          <el-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
            <div class="grid-content">￥231</div>
          </el-col>
          <el-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2">
            <div class="grid-content">
              <div>加入收藏</div>
              <div>删除</div>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>
<script>

export default {
  data () {
    return {
      num: 1
    }
  }
}
</script>
<style lang="less" scoped>
.car_search_box {
  height: 100px;
  width: 100vw;
  background-color: white;
  .car_header {
    position: relative;
    top: 50%;
    float: right;
    transform: translateY(-20px);
    width: 400px;
    right: 120px;
    height: 40px;
    // border: 1px solid;
    background-color: rgba(200, 199, 199, 0.542);
    border-radius: 20px;
    padding: 0 0 0 10px;
    input {
      background-color: rgba(200, 199, 199, 0);
      margin-left: 5px;
      height: 38px;
      width: 300px;
      border: 0px;
      outline: none;
    }
    button {
      float: right;
      margin-top: -1px;
      width: 80px;
      height: 40px;
      border: 0px;
      border-radius: 20px;
      background-color: cadetblue;
    }
  }
}
.car_box {
  // overflow: hidden;
  width: 80vw;
  padding-bottom: 20px;
  margin: 30px auto;
  background-color: white;
  border-radius: 20px;
  .car_title {
    height: 60px;
    border-bottom: 1px solid rgb(212, 203, 200);
    padding: 20px;
    div:first-child {
      float: left;
      font-weight: 700;
    }
    div:last-child {
      margin: -5px;
      font-size: 15px;
      float: right;
    }
    button {
      width: 60px;
      height: 30px;
      border: 0px;
      border-radius: 20px;
      color: white;
      background-color: rgb(159, 163, 167);
    }
  }
  .car_hd {
    font-size: 12px;
    font-weight: 600;
    line-height: 40px;
    margin-bottom: 10px;
    .grid-content {
      margin-left: 30px;
    }
  }
  .car_main {
    width: 75vw;
    height: 90px;
    margin: auto;
    margin-bottom: 20px;
    background: rgba(222, 220, 220, 0.495);
    padding: 20px;
    border-radius: 20px;
  }
  .item_img {
    img {
      width: 60px;
      height: 60px;
      display: inline;
    }
  }
}
</style>
